{* Smarty *}
<div id="main_header">{t}{$command}{/t} > {t}{$options}{/t}</div>
{if !empty($msg)}
	<div id="error"><tt>{$msg}</tt></div>
{/if}
<div class="box">
	<table cellspacing="0">
		<caption>{t}edit roles{/t}</caption>
		<tr>
			<th width="30%">{t}name{/t}</th>
			<th width="30%">{t}modify{/t}</th>
			<th width="30%">{t}delete{/t}</th>
		</tr>
		{foreach from=$roles item=role}
		<tr>
			{if $role.rid == 1 || $role.rid == 2 || $role.rid == 3}
			{assign var=role value="$role[1]"}
			<td>{t}{$role}{/t}</td>
			<td class="required">{t}required{/t}</td>
			<td class="required">{t}required{/t}</td>
			{else}
			<td>{$role.name}</td>
			<td>{html_image file="/smarty/templates_admin/$template/images/edit.gif" border="0" href="/admin/accesscontrol/roles/modify/`$role.rid`"}</td>
			<td>{html_image file="/smarty/templates_admin/$template/images/delete.gif" border="0" href="/admin/accesscontrol/roles/delete/`$role.rid`"}</td>
			{/if}
		</tr>
		{/foreach}
	</table>
</div>
<div class="box">
	<table cellspacing="0">
		<caption>{t}add role{/t}</caption>
		<tr>
			<th>{t}add role{/t}</th>
		</tr>
		<tr>
			{if isset($result)}
			<td class="success"><a class="success" href="{$smarty.server.PHP_SELF}">{t}role added{/t}</a></td>
			{else}
			<td class="form">
				<form {$form_data.attributes}>
				<table class="form">
					<tr>
						<td class="form">{$form_data.role.label}</td><td class="form">{$form_data.role.html}</td>
					</tr>
					<tr>
						<td colspan="2" class="right">{$form_data.btn_Submit.label}{$form_data.btn_Submit.html}</td>
					</tr>
					<tr>
					  <td colspan="2" class="center">{$form_data.requirednote}</td>
				  </tr>
				</table>
				</form>
			</td>
			{/if}
		</tr>
	</table>
</div>